<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/10/10
 * Time: 17:26
 */

namespace App\Services;

use App\Mail\FindPassword;
use App\Models\User;

class UserService extends BaseService
{
    protected $modelClass = User::class;

    public function sendSms()
    {
        return ['18321523077', '17682344799'];
    }

    public function sendEmail()
    {
        $sendEmail = [];
        $emails = ['648335255@qq.com', '18321523077@126.com'];
        foreach ($emails as $e) {
            $mail = null;
            $pwd = str_random(6);
            $attach = storage_path('app/test.txt');
            $mail = new FindPassword($pwd, $attach);
            $sendEmail[] = [
                'email' => $e,
                'mail' => $mail
            ];
        }
        return $sendEmail;
    }


}